Graphics processing method and system for rendering items of geometry based on their size

ABSTRACT

Methods and graphics processing systems render items of geometry using a rendering space which is subdivided into a plurality of first regions. Each of the first regions is sub-divided into a plurality of second regions. Each of a plurality of items of geometry is processed by identifying which of the first regions the item of geometry is present within, and for each identified first region determining an indication of the spatial coverage, within the identified first region, of the item of geometry, and using the determined indication of the spatial coverage within the identified first region to determine whether to add the item of geometry to a first control list for the identified first region or to add the item of geometry to one or more second control lists for a respective one or more of the second regions within the identified first region. Items of geometry within a second region can then be rendered using: (i) the first control list for the first region of which the second region is a part, and (ii) the second control list for the second region.

FIELD

This disclosure relates to graphics processing systems and methods ofrendering using graphics processing systems.

BACKGROUND

Graphics processing systems are typically configured to receive graphicsdata, e.g. from an application running on a computer system, and torender the graphics data to provide a rendering output. For example, thegraphics data provided to a graphics processing system may describegeometry within a three dimensional (3D) scene to be rendered, and therendering output may be a rendered image of the scene. Some graphicsprocessing systems (which may be referred to as “tile-based” graphicsprocessing systems) use a rendering space which is subdivided into aplurality of tiles. The “tiles” are regions of the rendering space, andmay have any suitable shape, but are typically rectangular (where theterm “rectangular” includes square). As is known in the art, there aremany benefits to subdividing the rendering space into tiles. Forexample, subdividing the rendering space into tiles allows an image tobe rendered in a tile-by-tile manner, wherein graphics data for a tilecan be temporarily stored “on-chip” during the rendering of the tile,thereby reducing the amount of data transferred between a system memoryand a chip on which a graphics processing unit (GPU) of the graphicsprocessing system is implemented.

Tile-based graphics processing systems typically operate in two phases:a geometry processing phase and a rendering phase. In the geometryprocessing phase, the graphics data for a render is analysed todetermine, for each of the tiles, which graphics data items are presentwithin that tile. Then in the rendering phase (e.g. a rasterisationphase), a particular tile can be rendered by processing those graphicsdata items which are determined to be present within that tile (withoutneeding to process graphics data items which were determined in thegeometry processing phase to not be present within the particular tile).

FIG. 1 shows an example of a tile-based graphics processing system 100.The system 100 comprises a memory 102, geometry processing logic 104 andrendering logic 106.

The geometry processing logic 104 and the rendering logic 106 may beimplemented on a GPU and may share some processing resources, as isknown in the art. The geometry processing logic 104 comprises a geometryfetch unit 108, geometry transform logic 110, a cull/clip unit 112,primitive block assembly logic 113 and a tiling unit 114. The renderinglogic 106 comprises a parameter fetch unit 116, a hidden surface removal(HSR) unit 118 and a texturing/shading unit 120. The memory 102 may beimplemented as one or more physical blocks of memory, and includes agraphics memory 122, a transformed parameter memory 124, a control listsmemory 126 and a frame buffer 128.

FIG. 2 shows a flow chart for a method of operating a tile-basedrendering system, such as the system shown in FIG. 1. The geometryprocessing logic 104 performs the geometry processing phase, in whichthe geometry fetch unit 108 fetches geometry data from the graphicsmemory 122 (in step S202) and passes the fetched data to the transformlogic 110. The geometry data comprises graphics data items (i.e. itemsof geometry) which describe geometry to be rendered. For example, theitems of geometry may represent geometric shapes, which describesurfaces of structures in the scene. Items of geometry are often“primitives”. A common primitive shape is a triangle, but primitives maybe other 2D shapes and may be lines or points also. Primitives can bedefined by their vertices, and vertex data can be provided describingthe vertices, wherein a combination of vertices describes a primitive(e.g. a triangular primitive is defined by vertex data for threevertices). Objects can be composed of one or more such primitives. Insome examples, objects can be composed of many thousands, or evenmillions of such primitives. Scenes typically contain many objects.Items of geometry can also be meshes (formed from a plurality ofprimitives, such as quads which comprise two triangular primitives whichshare one edge). Items of geometry may also be patches, wherein a patchis described by control points, and wherein a patch is tessellated togenerate a plurality of tessellated primitives.

In step S204 the geometry processing logic 104 pre-processes the itemsof geometry, e.g. by transforming the items of geometry into screenspace, performing vertex shading, performing geometry shading and/orperforming tessellation, as appropriate for the respective items ofgeometry. For example, the transform logic 110 may transform the itemsof geometry into the rendering space and may apply lighting/attributeprocessing as is known in the art. The resulting data is passed to thecull/clip unit 112 which culls and/or clips any geometry which fallsoutside of a viewing frustum. The remaining transformed items ofgeometry (e.g. primitives) are provided to the primitive block assemblylogic 113 which groups the items of geometry into blocks (which may bereferred to as “primitive blocks”) for storage. For example, each blockmay comprise up to N primitives, and up to M vertices, where the valuesof N and M are an implementation design choice. Each block can beassociated with a block ID such that the blocks can be identified andreferenced easily. Primitives often share vertices with otherprimitives, so storing the vertices for primitives in blocks allows thevertex data to be stored once in the block, wherein multiple primitivesin the primitive block can reference the same vertex data in the block.In step S206 the primitive blocks with the transformed geometric dataitems are provided to the memory 102 for storage in the transformedparameter memory 124. The transformed items of geometry and informationregarding how they are packed into the primitive blocks are alsoprovided to the tiling unit 114. In step S208, the tiling unit 114generates control stream data for each of the tiles of the renderingspace, wherein the control stream data for a tile includes a controllist of identifiers of transformed primitives which are to be used forrendering the tile, i.e. a list of identifiers of transformed primitiveswhich are positioned at least partially within the tile. The controlstream data for a tile may be referred to as a “display list”, “controllist” or an “object list” for the tile. In step S210, the control streamdata for the tiles is provided to the memory 102 for storage in thecontrol lists memory 126. Therefore, following the geometry processingphase (i.e. after step S210), the transformed primitives to be renderedare stored in the transformed parameter memory 124 and the controlstream data indicating which of the transformed primitives are presentin each of the tiles is stored in the control lists memory 126.

In the rendering phase, the rendering logic 106 renders the items ofgeometry (primitives) in a tile-by-tile manner. In step S212, theparameter fetch unit 116 receives the control stream data (i.e. thecontrol list) for a tile, and in step S214 the parameter fetch unit 116fetches the indicated transformed primitives from the transformedparameter memory 124, as indicated by the control stream data for thetile. In step S216 the rendering logic 106 renders the fetchedprimitives by performing sampling on the primitives to determineprimitive fragments which represent the primitives at discrete samplepoints within the tile, and then performing hidden surface removal andtexturing/shading on the primitive fragments. In particular, the fetchedtransformed primitives are provided to the hidden surface removal (HSR)unit 118 which performs the sampling to determine the primitivefragments, and removes primitive fragments which are hidden (e.g. hiddenby other primitive fragments). Methods of performing sampling and hiddensurface removal are known in the art. The term “fragment” refers to asample of a primitive at a sampling point, which is to be processed torender pixels of an image. The term “sampling” is used herein todescribe the process of determining fragments which represent items ofgeometry (e.g. primitives) at discrete sample points, but this processcan sometimes be referred to as “rasterization” or “scan conversion”. Insome examples, there may be a one to one mapping of fragments to pixels.However, in other examples there may be more fragments than pixels, andthis oversampling can allow for higher quality rendering of pixelvalues, e.g. by facilitating anti-aliasing and other filtering that maybe applied to multiple fragments for rendering each of the pixel values.Primitives which are not removed by the HSR unit 118 are provided to thetexturing/shading unit 120, which applies texturing and/or shading toprimitive fragments. Although it is not shown in FIG. 1, thetexturing/shading unit 120 may receive texture data from the memory 102in order to apply texturing to the primitive fragments, as is known inthe art. The texturing/shading unit 120 may apply further processing tothe primitive fragments (e.g. alpha blending and other processes), as isknown in the art in order to determine rendered pixel values of animage. The rendering phase is performed for each of the tiles, such thata whole image can be rendered with pixel values for the whole imagebeing determined. In step S218, the rendered pixel values are providedto the memory 102 for storage in the frame buffer 128. The renderedimage can then be used in any suitable manner, e.g. displayed on adisplay or stored in memory or transmitted to another device, etc.

The tile control lists allow the rendering logic 106 to identify andfetch the relevant primitives for rendering a particular tile (i.e. onlythose primitives which at least partially cover the tile). However, bigprimitives that cover most of the rendering space may be present withina large number of tiles. For example, a render of 1920×1080 pixels has2040 tiles when the tile size is 32×32 pixels. So, in this example(which is not unusual), large primitives can cover thousands of tiles,and as such an identifier of a large primitive may be written intothousands of control lists for the respective tiles. Furthermore, insome examples, the tile size may be different, e.g. the tile size may be16×16 pixels, in which case the number of tiles covered by a primitiveis four times greater than in the example given above in which the tilesize is 32×32 pixels.

Writing the primitive identifier data into lots (e.g. thousands) ofcontrol lists increases the memory write bandwidth, i.e. the amount ofdata that is transferred from the geometry processing logic 104 to thememory 102. This transfer of data from the geometry processing logic 104(which is typically implemented “on-chip”) to the memory 102 (which istypically implemented “off-chip” as system memory) can be a relativelyslow process (compared to other processes involved in rendering thegeometry data). Also, increasing the amount of data in the control listswill increase the minimum memory footprint of the control lists memory126.

Some applications, such as user interface applications, tend to submit asmall number of large primitives to the graphics processing system 100for rendering, and these applications may be particularly badly affectedby the replication of the primitive data to many control lists.

SUMMARY

This Summary is provided to introduce a selection of concepts in asimplified form that are further described below in the DetailedDescription. This Summary is not intended to identify key features oressential features of the claimed subject matter, nor is it intended tobe used to limit the scope of the claimed subject matter.

There is provided a method of rendering items of geometry in a graphicsprocessing system, wherein the graphics processing system is configuredto use a rendering space which is sub-divided into a plurality of firstregions, each of the first regions being sub-divided into a plurality ofsecond regions within the rendering space, wherein the method comprises:

-   -   processing a plurality of items of geometry including at least        one item of geometry which is present within two or more of the        first regions, wherein each of the plurality of items of        geometry is processed by:        -   identifying which of the first regions the item of geometry            is present within; and        -   for each identified first region:            -   determining an indication of the spatial coverage,                within the identified first region, of the item of                geometry; and            -   using the determined indication of the spatial coverage                within the identified first region to determine whether                to add the item of geometry to a first control list for                the identified first region or to add the item of                geometry to one or more second control lists for a                respective one or more of the second regions within the                identified first region; and    -   rendering items of geometry within a second region using: (i)        the first control list for the first region of which the second        region is a part, and (ii) the second control list for the        second region.

Said using the determined indication of the spatial coverage within theidentified first region may comprise: comparing the determinedindication of the spatial coverage with a threshold; and using a resultof the comparison to determine whether to add the item of geometry tothe first control list or to the one or more second control lists.

Said determining an indication of the spatial coverage, within theidentified first region, of the item of geometry may comprisedetermining a sub-polygon representing part of the item of geometrywithin the identified first region. The method may further comprise:determining a bounding box of the sub-polygon; and comparing a size ofthe bounding box of the sub-polygon with a threshold size, wherein ifthe size of the bounding box is below the threshold size then the itemof geometry is added to the one or more second control lists. If thesize of the bounding box of the sub-polygon is above the threshold sizethen the method may further comprise comparing the area of thesub-polygon with a threshold area, wherein if the area of thesub-polygon is below the threshold area then the item of geometry isadded to the one or more second control lists, and wherein if the areaof the sub-polygon is above the threshold area then the item of geometryis added to the first control list.

Said determining an indication of the spatial coverage, within theidentified first region, of the item of geometry may further comprise:determining the area of the sub-polygon; and comparing the determinedarea of the sub-polygon with a threshold area, wherein if the area ofthe sub-polygon is below the threshold area then the item of geometry isadded to the one or more second control lists, and wherein if the areaof the sub-polygon is above the threshold area then the item of geometryis added to the first control list.

The area of the sub-polygon may be determined using co-ordinates of thevertices of the sub-polygon which are rounded to quantised positions.The quantised positions may be aligned with boundaries between thesecond regions or with boundaries between blocks of second regions.

Said determining an indication of the spatial coverage, within theidentified first region, of the item of geometry may comprisedetermining the number of second regions within the first region inwhich the item of geometry is present. In some examples, if the item ofgeometry is present within more than a threshold number of the secondregions within the first region then the item of geometry is included inthe first control list for the first region, and if the item of geometryis present within less than the threshold number of the second regionswithin the first region then the item of geometry is included in the oneor more second control lists for the respective one or more secondregions within the first region in which the item of geometry ispresent. For example, if the item of geometry is present within all ofthe second regions within the first region then the item of geometry isincluded in the first control list for the first region, and if the itemof geometry is present within fewer than all of the second regionswithin the first region then the item of geometry is included in the oneor more second control lists for the respective one or more secondregions within the first region in which the item of geometry ispresent.

Said using the determined indication of the spatial coverage within theidentified first region may comprise: if the determined indication ofthe spatial coverage indicates that the item of geometry fully coversthe identified first region, adding the item of geometry to the firstcontrol list, and if the determined indication of the spatial coverageindicates that the item of geometry does not fully cover the identifiedfirst region, adding the item of geometry to the one or more secondcontrol lists for the respective one or more second regions within theidentified first region in which the item of geometry is present. Saidrendering items of geometry within a second region may compriseselectively processing items of geometry to determine which samplepoints within the second region are covered by the items of geometry,wherein said processing may be skipped for items of geometry which arein the first control list since it is known that items of geometry inthe first control list cover all of the sample points within the secondregion.

The items of geometry may be stored in data blocks in accordance with asubmission order of the items of geometry, wherein each data block maybe associated with a block ID, and wherein entries in the control listsmay include a block ID with a geometry indication to identify a datablock and to indicate one or more items of geometry from the identifieddata block.

Said rendering items of geometry within a second region may comprise:choosing, from the first control list for the first region of which thesecond region is a part and the second control list for the secondregion, the lowest block ID which has not been previously chosen; andfetching one or more items of geometry from the data block with thechosen block ID in accordance with the geometry indication for said datablock with the chosen block ID. If the lowest block ID which has notbeen previously chosen is in both the first control list for the firstregion of which the second region is a part and the second control listfor the second region, then the method may comprise forming a mergedgeometry indication which identifies items of geometry from the datablock with said lowest block ID based on the geometry indications ofsaid first and second control lists.

The method may further comprise, for each identified first region, if anitem of geometry is to be added to the first control list for theidentified first region: determining a sub-region mask for the item ofgeometry to indicate which of a plurality of sub-regions within thefirst region the item of geometry is present within; and including thesub-region mask for the item of geometry in the first control list. Thesub-regions may be second regions within the first region, or thesub-regions may be groups of second regions within the first region.

Adding an item of geometry to a control list may comprise adding anindication of the item of geometry to the control list.

The rendering space may be sub-divided into a plurality of thirdregions, wherein each of the third regions corresponds to a group offirst regions within the rendering space, wherein said processing anitem of geometry may comprise:

-   -   identifying which of the third regions the item of geometry is        present within; and for each identified third region:        -   determining an indication of the spatial coverage, within            the identified third region, of the item of geometry; and        -   using the determined indication of the spatial coverage            within the identified third region to determine whether to            add the item of geometry to a third control list for the            identified third region or to proceed with said processing            of the item of geometry; and    -   wherein the items of geometry within a second region are        rendered further using: (iii) the third control list for the        third region of which the first region, of which the second        region is a part, is a part.

An item of geometry may be present within a region of the renderingspace if, when processed, at least a portion of the processed geometryis present within the region. An item of geometry may be a primitive, amesh, a patch or a quad. The items of geometry may be within a 3D sceneto be rendered from a viewpoint, and wherein said rendering items ofgeometry may generate image values representing an image of the scene asviewed from the viewpoint.

There is provided a graphics processing system configured to renderitems of geometry using a rendering space which is sub-divided into aplurality of first regions, each of the first regions being sub-dividedinto a plurality of second regions within the rendering space, whereinthe graphics processing system comprises:

-   -   geometry processing logic configured to process a plurality of        items of geometry including at least one item of geometry which        is present within two or more of the first regions, wherein the        geometry processing logic is configured to process each of the        plurality of items of geometry by:        -   identifying which of the first regions the item of geometry            is present within; and        -   for each identified first region:            -   determining an indication of the spatial coverage,                within the identified first region, of the item of                geometry; and            -   using the determined indication of the spatial coverage                within the identified first region to determine whether                to add the item of geometry to a first control list for                the identified first region or to add the item of                geometry to one or more second control lists for a                respective one or more of the second regions within the                identified first region; and    -   rendering logic configured to render items of geometry within a        second region using: (i) the first control list for the first        region of which the second region is a part, and (ii) the second        control list for the second region.

There may be provided a graphics processing system configured to performany of the method described herein.

There may be provided a method of rendering primitives in a graphicsprocessing system which is configured to use a rendering space which issubdivided into a plurality of regions, the method comprising:

-   -   a geometry processing phase comprising:        -   determining, for each of a plurality of primitives which are            present in a region, whether the primitive totally covers            the region; and        -   storing data for the primitives which are present in the            region, wherein the stored data comprises, for each of the            primitives which are determined to totally cover the region,            data to indicate total coverage of the region; and a            rendering phase for rendering primitives within the region            comprising:        -   retrieving the stored data for the primitives which are            present in the region;        -   selectively processing the primitives which are present in            the region based on the retrieved data to determine which            sample points within the region are covered by the            primitives, wherein if the retrieved data includes data            which indicates total coverage of the region for a            particular primitive then said processing to determine which            sample points within the region are covered by the            particular primitive is skipped; and        -   determining rendered values at the sample points within the            region based on the primitives which cover the respective            sample points.

There may be provided a graphics processing system configured to renderprimitives using a rendering space which is sub-divided into a pluralityof regions, wherein the graphics processing system comprises:

-   -   geometry processing logic configured to:        -   determine, for each of a plurality of primitives which are            present in a region,        -   whether the primitive totally covers the region; and        -   store data for the primitives which are present in the            region, wherein the stored data comprises, for each of the            primitives which are determined to totally cover the region,            data to indicate total coverage of the region; and    -   rendering logic configured to:        -   retrieve the stored data for the primitives which are            present in a region;        -   selectively process the primitives which are present in the            region based on the retrieved data to determine which sample            points within the region are covered by the primitives, such            that if the retrieved data includes data which indicates            total coverage of the region for a particular primitive then            the processing to determine which sample points within the            region are covered by the particular primitive is skipped;            and        -   determine rendered values at the sample points within the            region based on the primitives which cover the respective            sample points.

The graphics processing system may be embodied in hardware on anintegrated circuit. There may be provided a method of manufacturing, atan integrated circuit manufacturing system, a graphics processingsystem. There may be provided an integrated circuit definition datasetthat, when processed in an integrated circuit manufacturing system,configures the system to manufacture a graphics processing system. Theremay be provided a non-transitory computer readable storage medium havingstored thereon a computer readable description of a graphics processingsystem that, when processed in an integrated circuit manufacturingsystem, causes the integrated circuit manufacturing system tomanufacture an integrated circuit embodying a graphics processingsystem.

There may be provided an integrated circuit manufacturing systemcomprising: a non-transitory computer readable storage medium havingstored thereon a computer readable description of the graphicsprocessing system; a layout processing system configured to process thecomputer readable description so as to generate a circuit layoutdescription of an integrated circuit embodying the graphics processingsystem; and an integrated circuit generation system configured tomanufacture the graphics processing system according to the circuitlayout description.

There may be provided computer program code for performing any of themethods described herein. There may be provided non-transitory computerreadable storage medium having stored thereon computer readableinstructions that, when executed at a computer system, cause thecomputer system to perform any of the methods described herein.

The above features may be combined as appropriate, as would be apparentto a skilled person, and may be combined with any of the aspects of theexamples described herein.

BRIEF DESCRIPTION OF THE DRAWINGS

Examples will now be described in detail with reference to theaccompanying drawings in which:

FIG. 1 shows a graphics processing system;

FIG. 2 is a flow chart for a method of rendering items of geometry inthe graphics processing system;

FIG. 3 illustrates items of geometry within a rendering space which issub-divided into multiple levels of regions;

FIG. 4 is a flow chart for a method of adding items of geometry tocontrol lists according to an example described herein;

FIG. 5a is a flow chart for a method of fetching and rendering items ofgeometry in a tile when there are multiple control lists for the tile;

FIG. 5b shows an example of a macro tile control list and a tile controllist;

FIG. 6 illustrates an example of a region within a rendering space andtwo primitives which are present within the region;

FIG. 7 is a flow chart for a method of rendering primitives where someof the primitives may totally cover some of the regions within arendering space;

FIG. 8 shows a computer system in which a graphics processing system isimplemented; and

FIG. 9 shows an integrated circuit manufacturing system for generatingan integrated circuit embodying a graphics processing system.

The accompanying drawings illustrate various examples. The skilledperson will appreciate that the illustrated element boundaries (e.g.,boxes, groups of boxes, or other shapes) in the drawings represent oneexample of the boundaries. It may be that in some examples, one elementmay be designed as multiple elements or that multiple elements may bedesigned as one element. Common reference numerals are used throughoutthe figures, where appropriate, to indicate similar features.

DETAILED DESCRIPTION

The following description is presented by way of example to enable aperson skilled in the art to make and use the invention. The presentinvention is not limited to the embodiments described herein and variousmodifications to the disclosed embodiments will be apparent to thoseskilled in the art.

Embodiments will now be described by way of example only.

Graphics processing systems described herein use multiple “levels” oftiling, such that a tiling resolution can be chosen for adding items ofgeometry to control lists based on the size of the items of geometry.For example, in a system which uses two “levels” of tiling, therendering space can be sub-divided into a plurality of first regions(which, as described in more detail below, may be “macro tiles”),wherein each of the first regions is sub-divided into a plurality ofsecond regions. The second regions may correspond to tiles or groups oftiles within the rendering space. A first control list can be formed foreach first region, and a second control list can be formed for eachsecond region. An item of geometry which is present within a secondregion can be added to either the second control list for the secondregion, or the first control list for the first region of which thesecond region is a part. The decision as to which of the control liststhe item of geometry is added to can be made based on the size of theitem of geometry, and more particularly based on the spatial coverage ofthe item of geometry within the first region. This decision may be madeindependently for each of the first regions that the item of geometry ispresent within. In general, an item of geometry is present within aregion of the rendering space if, when processed, at least a portion ofthe processed geometry is present within the region. Some processingperformed on an item of geometry (in the geometry processing phase,prior to tiling) might alter the shape and/or position of the item ofgeometry (e.g. performing vertex shading, geometry shading ortessellation).

For example, large items of geometry which cover a large proportion of amacro tile (or “first region”) may be added to the control list for themacro tile, whereas items of geometry which do not cover a largeproportion of the macro tile can be added to the control list(s) for thetile(s) (or “second region(s)”) within the macro tile in which the itemsof geometry are present. What is considered to be a “large” proportionof the macro tile can be determined in a number of different ways, asexplained in detail in the examples below. For example, a threshold areacan be set (where the threshold may for example, be 25%, 33%, 50%, 66%,75% or even 100% to give just some examples), and the spatial coverageof an item of geometry within a first region can be compared with thethreshold to determine whether to add the item of geometry to the firstcontrol list for the first region.

It is to be understood that where we refer to adding an item of geometryto a control list, this is intended to cover adding an identifier of theitem of geometry to the control list, and not necessarily adding all ofthe data associated with the item of geometry to the control list.

Adding large items of geometry to control lists for first regions (e.g.to control lists for macro tiles) means that the item of geometry doesnot need to be added to the separate control lists for the tiles withinthe first region. Therefore, there is less repetition of a large item ofgeometry in the control lists stored in the memory. Therefore, theamount of data passed from the (e.g. on-chip) geometry processing logicto the (e.g. off-chip) memory is reduced. In other words, the memorywrite bandwidth is reduced compared to the prior art system described inthe background section above. Furthermore, the memory footprint of thecontrol lists memory can be significantly reduced compared to the priorart system described in the background section above.

The rendering phase for a current render is performed after the geometryprocessing phase for the current render has completed. In other words,the rendering phase for a current render does not start until all stepsof the geometry processing phase for the current render have beencompleted. The rendering phase may include performing sampling on theprimitives to determine primitive fragments which represent theprimitives at discrete sample points within the tile, which can also bereferred to as “rasterisation”. However, the geometry processing phaseoperates on primitives which represent areas defined by vertices, ratherthan determining primitive fragments at discrete sample points. Inparticular, the geometry processing phase does not compriserasterization, i.e. the geometry processing phase is performed withoutperforming rasterisation on primitives. Rasterisation is not performedfor a current render until all steps of the geometry processing phasehave been completed for the current render. The geometry processingphase therefore happens before rasterisation.

The graphics processing system shown in FIG. 1 can be used to implementexamples described herein, and the flow chart shown in FIG. 2 describes,at a high-level, the way in which items of geometry are rendered inexamples described herein. However, in examples described herein, one ormore extra levels of tiling are introduced, wherein identifiers of itemsof geometry may be added to control lists corresponding to differentlevels of tiling based on the spatial coverage of the items of geometry.In this sense, examples described herein implement “hierarchicaltiling”.

In a first example described in detail herein, just two levels of tilingare used, such that the system uses: (i) control lists for macro tiles,and (ii) control lists for tiles. As described in more detail below, inother examples, more than two levels of tiling may be used.

FIG. 3 shows an example of a rendering space 300 which is sub-dividedinto four macro tiles (as shown in bold, and referenced as 302 ₀, 302 ₁,302 ₂ and 302 ₃ in FIG. 3) arranged in a 2×2 block. In other examples,the rendering space may be divided into a different number of macrotiles, e.g. sixteen macro tiles arranged in a 4×4 block.

In the example shown in FIG. 3, each macro tile is sub-divided intosixteen tile blocks arranged as a 4×4 block of tile blocks. Four of thetile blocks are referenced in FIG. 3 as 304 ₀, 304 ₁, 304 ₂ and 304 ₃.In this example, each tile block represents sixteen tiles arranged as a4×4 block of tiles. For clarity, the individual tiles are not shown inFIG. 3, but it is noted that each macro tile in this simple exampleincludes 256 tiles, such that the whole rendering space includes 1024tiles. FIG. 3 shows items of geometry including two triangularprimitives 306 and 308, and a quad 310 in the rendering space 300.Primitive 306 is defined by vertices V0, V1 and V2; primitive 308 isdefined by vertices V3, V4 and V5; and quad 310 is defined by verticesV6, V7, V8 and V9. The quad 310 is formed from two triangularprimitives: primitive 310 ₀ defined by vertices V6, V7 and V9; andprimitive 310 ₁ defined by vertices V7, V8 and V9. The two primitives310 ₀ and 310 ₁ share an edge between vertices V7 and V9, such that theyform the quad 310 with the edge between vertices V7 and V9 beinginternal to the quad 310.

In this example, the rendering of items of geometry (e.g. primitives,meshes such as quads, patches, etc.) is performed as outlined in theflow chart of FIG. 2. Steps S202, S204 and S206 are performed asdescribed above, such that items of geometry are fetched by the geometryfetch unit 108 from the graphics memory 122, transformed into therendering space by the transform logic 110, culled and/or clipped asappropriate by the culling/clipping unit 112, packed into primitiveblocks by the primitive block assembly logic 113 and stored in thetransformed parameter memory 124 in the memory 102.

The step of performing tiling and forming control lists, differs fromthe corresponding step S208 of the example described above in thebackground section. In examples described herein, the tiling processperformed by the tiling unit 114 comprises implementing a method, asshown in the flow chart of FIG. 4 (instead of performing step S208), toadd an item of geometry to one or more first control lists, and/or toone or more second control lists. The method shown in FIG. 4 isperformed for each item of geometry which is to be tiled by the tilingunit 114. As described above, an item of geometry may for example be aprimitive, or in other examples may be a mesh (e.g. a quad) or a patch.In this example, the “first regions” are the macro tiles 302 ₀ to 302 ₃,and the “second regions” are the individual tiles (not shown in FIG. 3).

In step S402, an item of geometry is processed to identify which of thefirst regions (e.g. which of the macro tiles 302), the item of geometryis present within. This can be performed in any suitable manner. Thereare a number of techniques known in the art for identifying which of themacro tiles 302 an item of geometry is present within. For example, abounding box (e.g. an axis-aligned bounding box) of the item of geometrymay be determined, wherein the item of geometry is not present withinany of the macro tiles which do not at least partially overlap with thebounding box of the item of geometry. If the bounding box of the item ofgeometry does not cross a macro tile boundary in both X and Ydirections, then it is known that the item of geometry is present withinall of the macro tiles which overlap with the bounding box of the itemof geometry. For example, it is known that the item of geometry ispresent within all of the macro tiles which overlap with the boundingbox of the item of geometry if: (i) the bounding box of the item ofgeometry is completely within a single macro tile such that it does notcross a macro tile boundary, (ii) the bounding box of the item ofgeometry crosses one or more macro tile boundaries in the X directionbut does not cross any macro tile boundaries in the Y direction, or(iii) the bounding box of the item of geometry crosses one or more macrotile boundaries in the Y direction but does not cross any macro tileboundaries in the X direction. However, if the bounding box of the itemof geometry crosses macro tile boundaries in both X and Y directionsthen it is possible that the item of geometry is not present within allof the macro tiles which overlap with the bounding box of the item ofgeometry. A conservative approach would be to determine that the item ofgeometry is in each of the macro tiles that the bounding box of the itemof geometry overlaps. Alternatively, a “perfect tiling” approach can beused to determine which of the macro tiles 302 which do overlap thebounding box of the item of geometry, the item of geometry is presentwithin. For example, for each of the macro tiles which do overlap withthe bounding box of the item of geometry, a test can be performed todetermine whether the item of geometry is present within the macro tile.The test may involve, for each edge of the item of geometry, comparing acorner position of the macro tile with the line equation for the edge todetermine whether the corner position of the macro tile is inside oroutside of the edge.

Following step S402, a set of one or more macro tiles 302 have beenidentified in which the item of geometry is present. A process can thenbe performed for each of the identified macro tile(s) (e.g.independently) to determine whether the item of geometry covers a largeproportion of each of the macro tiles. If the item of geometry covers alarge proportion of a macro tile (such that the item of geometry can betreated as a “big” item of geometry in respect of the macro tile) thenit is added to the macro tile control list, but if the item of geometrydoes not cover a large proportion of a macro tile (such that the item ofgeometry cannot be treated as a “big” item of geometry in respect of themacro tile) then it is not added to the macro tile control list, andinstead it can be added to one or more tile control lists for the tileswithin the macro tile. The determination of whether an item of geometryis “big” in respect of a macro tile can be performed in different waysin different examples. For example, steps S406 to S418 can be performedto determine whether an item of geometry is big in respect of a macrotile. The same item of geometry may be treated as a big item of geometryin respect of one macro tile, but as a small item of geometry in respectof another macro tile. In other words, the decision as to whether or notan item of geometry is big may be taken in respect of each macro tileseparately, e.g. based on the spatial coverage of the item of geometrywith the particular macro tile in question.

In step S404 one of the identified macro tiles 302 is selected. Theorder in which the identified macro tiles 302 are selected is notimportant because by the end of the method all of the identified macrotiles will have been selected in a respective iteration of the method.

As will become apparent from the following description of the rest ofthe method shown in FIG. 4, for each identified first region (e.g. foreach macro tile 302 in which the item of geometry is present), anindication of the spatial coverage of the item of geometry, within theidentified first region, is determined. This indication is then used todetermine whether to add the item of geometry to a first control listfor the identified first region (e.g. macro tile) or to add the item ofgeometry to one or more second control lists for a respective one ormore of the second regions (e.g. one or more tiles) within theidentified first region. The method steps S406 to S426 are just oneexample of how this could be implemented.

In step S406, an overlap area between the selected macro tile 302 and abounding box for the item of geometry is determined. The overlap area isan indication of the spatial coverage of the item of geometry within theselected macro tile 302. However, the overlap area determined in stepS406 is a fairly crude approximation of the true overlap between theitem of geometry and the selected macro tile 302. In particular, theoverlap area determined in step S406 will tend to overestimate the trueoverlap between the item of geometry and the selected macro tile becausethe bounding box of the item of geometry tends to be larger than theitem of geometry itself. The bounding box used in step S406 may berectangular. For example, the bounding box used in step S406 may be anaxis-aligned bounding box (AABB). It is noted that determining the sizeof an axis-aligned bounding box for an item of geometry is a very simpleprocess. For example, this can be done by finding the maximum andminimum values of the coordinates in both the x and y directions of thevertices of the item of geometry. These maximum and minimum values inthe x and y directions will represent the extents of the bounding box inthe x and y directions.

In step S408 the overlap area that was determined in step S406 iscompared with a threshold. The threshold may for example be a proportionof the area of a macro tile 302. For example, the threshold could be ¼of the area of the selected macro tile 302. In other examples, thethreshold could be other proportions of the area of a macro tile, or thethreshold may be based on something other than a proportion of the areaof a macro tile. The granularity with which the boundaries and sizes ofthe bounding box and the macro tile are determined can be different indifferent examples. In some examples, the boundaries of the bounding boxand the macro tile are determined at tile granularity, such that theirsizes are determined as integer numbers of tiles.

If, in step S408, it is determined that the overlap area is not greaterthan (e.g. is less than) the threshold then the item of geometry is notconsidered to cover a large proportion of the selected macro tile 302.In other words, if in step S408 it is determined that the overlap areais not greater than the threshold then the item of geometry is notconsidered to be a “big” item of geometry in respect of the selectedmacro tile. Therefore, the item of geometry is not added to the controllist for the selected macro tile 302, and instead the item of geometrycan be added to one or more tile control lists for one or more tileswithin the macro tile. Therefore, if in step S408 it is determined thatthe overlap area is not greater than the threshold then the methodpasses from step S408 to step S424 which is described below.

However, if in step S408 it is determined that the overlap area isgreater than the threshold then the item of geometry might cover a“large” proportion of the selected macro tile 302. In this case themethod passes from step S408 to step S410 in which a sub-polygonrepresenting part of the item of geometry within the selected macro tile302 is determined. A “sub-polygon” is the part of an item of geometrywhich falls within the selected macro tile 302. Therefore, if an item ofgeometry is present within two or more macro tiles then a sub-polygon,in respect of one of the macro tiles in which the item of geometry ispresent, is smaller than the item of geometry of which it is a part. Indifferent examples, the sub-polygon may be determined in different ways.For example, intersection points between edges of the item of geometryand boundaries of the selected macro tile 302 may be determined and usedas vertices of the sub-polygon. Furthermore, any vertices of the item ofgeometry that are within the selected macro tile 302 can be used asvertices of the sub-polygon. Furthermore, corners of the selected macrotile 302 within the item of geometry can be used as vertices of thesub-polygon.

In step S412 a bounding box of the sub-polygon is determined. Forexample, the bounding box may be rectangular, e.g. an axis-alignedbounding box. As described above, determining an axis-aligned boundingbox is a simple process which, for a sub-polygon, involves finding themaximum and minimum x and y values from the coordinates of the verticesof the sub-polygon. It is noted that a sub-polygon is present within asingle macro tile only. Furthermore, if the bounding box is anaxis-aligned bounding box then the bounding box of a sub-polygon is alsopresent within a single macro tile only.

In step S414 a size of the bounding box of the sub-polygon is comparedwith a threshold size. In some examples, the bounding box of thesub-polygon is determined at tile granularity, i.e. the boundaries ofthe bounding box may be aligned with tile boundaries within the selectedmacro tile. The threshold size may be expressed as a number of tiles. Togive an example, the threshold size used in step S414 could be 0.4N,where N is the number of tiles in the selected macro tile. In someexamples, a different number of tiles may be used as the threshold. Inother examples, the threshold size might be expressed as something otherthan a number of tiles, e.g. it may be expressed as an area.

If, in step S414, it is determined that the size of the bounding box ofthe sub-polygon is below the threshold size then the item of geometry isnot considered to cover a large proportion of the selected macro tile302. Therefore, the item of geometry is not added to the macro tilecontrol list for the selected macro tile 302, and instead the item ofgeometry can be added to one or more tile control lists for one or moretiles within the macro tile, and the method passes to step S424 which isdescribed below.

However, if in step S414 it is determined that the size of the boundingbox of the sub-polygon is above the threshold size then the item ofgeometry might cover a “large” proportion of the selected macro tile302. In this case the method passes from step S414 to step S416 in whichthe area of the sub-polygon is determined. A skilled person would knowhow to determine the area of a sub-polygon. For example, if thesub-polygon is a triangle with vertices at coordinates (x₀,y₀), (x₁,y₁)and (x₂,y₂) then the area of the triangle (A) can be determined bycalculating half of the absolute value of the determinant. The value ofthe determinant (TriDet) for the triangle can be defined as:

TriDet=(x ₁ *y ₂ −x ₂ *y ₁)+(x ₂ *y ₀ −x ₀ *y ₂)+(x ₀ *y ₁ −x ₁ *y ₀).

Therefore, the area (A) of the triangle can be calculated asA=½|TriDet|. If the sub-polygon comprises multiple triangles then thearea of the separate triangles can be determined and then summed to givethe area of the sub-polygon.

In step S418 the area of the sub-polygon is compared with a thresholdarea. In different examples, the threshold area can take differentvalues. For example, the threshold area could be a proportion of thearea of the selected macro tile 302. For example, the threshold areacould be ¼ of the area of selected macro tile.

Therefore, step S418 could involve determining whether ½|TriDet|>¼Area_(MT), where Area_(MT) is the area of the macro tile. In someexamples, steps S416 and S418 could be combined into a single step, sothat the area A of the sub-polygon is not explicitly determined (i.e. avalue of ½|TriDet| is never explicitly determined), and instead themethod can go straight to determining whether |TriDet|>Area_(MT) inorder to determine whether the area of the sub-polygon is larger thanthe threshold area. If the area of the sub-polygon is determined to belarger than the threshold area then the item of geometry is consideredto be a large item of geometry in respect of the selected macro tile302, and the method passes to step S420. However, if the area of thesub-polygon is determined to be not larger than (e.g. determined to besmaller than) the threshold area then the item of geometry is notconsidered to be a large item of geometry in respect of the selectedmacro tile 302, and the method passes to step S424.

In some examples, instead of determining the absolute value of TriDet, asigned value of TriDet may be used, and depending on the sign of TriDet,one of two conditions may be used to determine whether the area of thesub-polygon is larger than the threshold area. In particular, theconditions are:

TriDet>½ Area_(MT), if TriDet>0

TriDet<½ Area_(MT), if TriDet<0

The calculation for the area of the sub-polygon does not need to beextremely accurate for the purpose of categorising the sub-polygon aseither: (i) covering a large area of the selected macro tile 302, or(ii) not covering a large area of the selected macro tile 302. Theaccuracy with which the determinant (TriDet) is calculated may bedifferent in different examples. For example, the coordinates used todetermine the determinant may be specified at sample precision, or at alower precision, such as at tile granularity, e.g. such that thecoordinates are defined in integer numbers of tiles within the selectedmacro tile 302. In other words, the area of the sub-polygon may bedetermined using coordinates of the vertices of the sub-polygon whichare rounded to quantised positions, and in some examples, the quantisedpositions may be aligned with boundaries between the tiles or withboundaries between blocks of tiles.

In some examples, the spatial coverage, within the selected macro tile,of the item of geometry may be determined as a number of second regions(e.g. tiles or tile groups) within the selected macro tile in which theitem of geometry is present. In some examples, in order for the item ofgeometry to be considered a large item of geometry with respect to theselected macro tile, the item of geometry may need to be present withinmore than a threshold number (e.g. all) of the second regions (e.g.tiles or tile groups) within the selected macro tile. In these examples,if the item of geometry is present within more than the threshold holdnumber (e.g. all) of the second regions within the selected macro tilethen the item of geometry is included in the macro tile control list forthe selected macro tile, but if the items of geometry is present withinless than the threshold number (e.g. fewer than all) of the secondregions within the selected macro tile then the item of geometry isincluded in the one or more second control lists for the respective oneor more second regions (e.g. tiles or tile groups) within the selectedmacro tile in which the item of geometry is present.

All three of the steps S408, S414 and S418 involve comparing anindication of the spatial coverage of the item of geometry, within theselected macro tile, with a threshold, and using a result of thecomparison to determine whether to add the item of geometry to the firstcontrol list (e.g. the control list for the selected macro tile 302) orto one or more of the control lists for the second regions (e.g. thetile control lists for the tiles within the selected macro tile 302).

If the method passes to step S420 this means that the item of geometryis considered to be a large item of geometry in respect of the selectedmacro tile 302. In step S420 tiling is performed to determine whichsub-regions within the selected macro tile 302 the item of geometry ispresent within. Methods of performing tiling to determine which regionsof a rendering space an item of geometry is present within are known inthe art. The tiling may be performed on the item of geometry or on thesub-polygon representing the part of the item of geometry which overlapswith the selected macro tile 302. The “sub-regions” for which tiling isperformed in step S420 may be tiles or groups of tiles (e.g. 2×2 groupsof tiles). Since step S420 is only performed for items of geometry whichare considered to be large within the selected macro tile, the item ofgeometry is often present within a large proportion (e.g. more thanhalf) of the tiles within the selected macro tile 302 in step S420, andthis is one reason why in some examples the sub-regions for which tilingis performed in step S420 may be groups of tiles.

In some examples, step S420 is not performed. Although it can improvethe efficiency of the system to perform the tiling of step S420, it doesnot cause any rendering errors to omit this tiling step.

In some examples, the tiling performed in step S420 also includesdetermining a sub-region mask for the item of geometry to indicate whichof the sub-regions within the selected macro tile 302 the item ofgeometry is present within. However, in some other examples, the item ofgeometry will only be included in the macro tile control list for theselected macro tile 302 if it is present within all of the sub-regionswithin the macro tile; and in these examples, there is no need toperform tiling (i.e. no need to: (i) determine which sub-regions withinthe selected macro tile 302 the item of geometry is present within, or(ii) determine a sub-region mask) because if an item of geometry isincluded in the macro tile control list then it is known that the itemof geometry is present within all of the sub-regions within the macrotile.

In step S422 the item of geometry is added to the first control list,i.e. to the control list for the selected macro tile 302. In examplesdescribed herein, adding an item of geometry to a control list comprisesadding an indication of the item of geometry to the control list. Asdescribed above, in step S206 primitive blocks comprising data formultiple items of geometry are stored in the transformed parametermemory 124. The indication of the item of geometry that is included in acontrol list may comprise an indication of the relevant primitive blockand an index to identify the item of geometry from the multiple items ofgeometry which are included in that primitive block. Furthermore, if asub-region mask for the item of geometry was determined in step S420then that mask is also included in the control list for the selectedmacro tile 302. In examples described herein, an entry in the controllist for a macro tile relates to one item of geometry and comprises anindication of the item of geometry (e.g. a primitive block ID and anindex to locate the item of geometry within the primitive block) and asub-region mask to indicate which of the sub-regions within the macrotile the item of geometry is present within.

In the examples mentioned above, in which step S420 is not performed,the item of geometry can be included in the control list for theselected macro tile 302 without a sub-region mask, or with a sub-regionmask which indicates that the item of geometry is considered to bepresent within all of the sub-regions within the macro tile. In theseexamples, the item of geometry will be processed in the rendering phasefor all of the tiles of the selected macro tile 302 even if the item ofgeometry is not present within all of the tiles of the selected macrotile 302. This can cause some reduction in efficiency because the itemof geometry may be processed unnecessarily in the rendering phase forsome of the tiles, but this will not cause rendering errors because ifthe item of geometry is not present within a tile then the samplingperformed in the rendering phase will determine that the item ofgeometry is not present at any of the sample points of the tile andtherefore will not generate any fragments from the item of geometry inthe tile. After step S422 the method passes to step S428 describedbelow.

If the method passes to step S424 (from any of steps S408, S414 or S418)this means that the item of geometry is not considered to be a largeitem of geometry in respect of the selected macro tile 302. In step S424tiling is performed to determine which tiles within the selected macrotile 302 the item of geometry is present within. As mentioned above,methods of performing tiling to determine which tiles of a renderingspace an item of geometry is present within are known in the art. Thetiling may be performed on the item of geometry or on the sub-polygonrepresenting the part of the item of geometry which overlaps with theselected macro tile 302. Since step S424 is only performed for items ofgeometry which are not considered to be large within the selected macrotile, the item of geometry is often present within only a smallproportion (e.g. less than a quarter) of the tiles within the selectedmacro tile 302 in step S424, which is why in examples described hereinthe tiling is performed at the level of tiles (rather than at the levelof tile groups) in step S424. However, in other examples, the tilingperformed in step S424 could be performed at the level of tile groups,e.g. 2×2 groups of tiles.

In step S426 the item of geometry is added to the second control listi.e. one or more tile control lists for the tiles within the selectedmacro tile which the item of geometry is present within. In examplesdescribed herein, adding an item of geometry to a control list comprisesadding an indication of the item of geometry to the control list.

The structure of the data within the tile control lists may be differentin different examples. For example, an entry in a tile control list fora tile may comprise an indication of a primitive block stored in thetransformed parameter memory 124 and data (e.g. a mask) to indicatewhich of the items of geometry in the primitive block are present withinthe tile. Therefore, in these examples, an entry in a tile control listfor a tile may indicate multiple items of geometry from a primitiveblock as being present within the tile. Therefore, an entry in a tilecontrol list can be iteratively updated during the geometry processingphase as more items of geometry from a primitive block are processed.

It is noted that in examples described herein the structure of theentries in the tile control lists is different to the structure of theentries in the macro tile control lists. In particular, in examplesdescribed herein, an entry in a macro tile control list for a macro tilerelates to a single item of geometry (which may be indicated by way of aprimitive index in a particular primitive block) and includes anindication (e.g. a mask) of which of the sub-regions (e.g. tile groupsor tiles) within the macro tile the item of geometry is present within;whereas in contrast, an entry in a tile control list for a tile relatesto a primitive block and includes an indication (e.g. a mask) of whichof the items of geometry within the primitive block are present in thetile.

After step S426 the method passes to step S428. In step S428 it isdetermined whether there is another macro tile which was identified instep S402 which has not yet been selected in step S404. If there isstill one or more identified macro tile which has not yet been selectedthen the method passes back to step S404 so that another macro tile canbe selected and processed in respect of the item of geometry.

If it is determined in step S428 that there is not another macro tilewhich was identified in step S402 but which has not yet been selected instep S404 then the method passes to step S430. In step S430 it isdetermined whether there is another item of geometry to process in thecurrent render. If there is, then the method passes back to step S402and the method is performed in respect of another item of geometry. Ifit is determined in step S430 that there are no more items of geometryto process then the process ends at step S432. At this point all of theitems of geometry of a scene for the current render have been processedand the control lists have been determined. As indicated in step S210 ofFIG. 2, the control lists can then be stored, thereby completing thegeometry processing phase.

We will now run through some examples of how some of the items ofgeometry such as the primitives 306 and 308 and the quad 310 shown inFIG. 3 would be processed by the method shown in FIG. 4. For primitive306, all four of the macro tiles 302 ₀, 302 ₁, 302 ₂ and 302 ₃ will beidentified in step S402 because the primitive 306 is present in all fourof these macro tiles. The first macro tile 302 ₀ will be selected instep S404. In step S406 a bounding box for the primitive 306 will bedetermined and the overlap area between this bounding box and the macrotile 302 ₀ will be determined. From looking at FIG. 3 it can beappreciated that this overlap area will be small, in particular it willbe less than the threshold used in step S408, e.g. less than ¼ of thearea of the macro tile 302 ₀. Therefore, the method passes to S424 theprimitive 306 will be added to the second control list i.e. tile controllists for the tiles that it covers within the macro tile 302 ₀, but itwill not be added to the macro tile control list for the macro tile 302₀. For macro tile 302 ₁, it can be appreciated from looking at FIG. 3that the overlap area between the bounding box of the primitive 306 withthe macro tile 302 ₁ will be less than the threshold, e.g. less than ¼of the area of the macro tile 302 ₁, so the primitive 306 will be addedto the tile control lists for the tiles that it covers within the macrotile 302 ₁, but it will not be added to the macro tile control list forthe macro tile 302 ₁. However, for macro tile 302 ₂ the bounding box ofthe primitive 306 will overlap with almost all of the macro tile 302 ₂,so the method passes to step S410 in which a sub-polygon is determinedrepresenting the part of the primitive 306 which is within the macrotile 302 ₂. The vertices of this sub-polygon are: (i) V0, (ii) V1, (iii)the intersection point (Int₁) between the edge of the primitive 306between vertices V1 and V2 and the boundary between macro tiles 302 ₀and 302 ₂, (iv) the intersection point (Int₂) between the edge of theprimitive 306 between vertices V0 and V2 and the boundary between macrotiles 302 ₂ and 302 ₃, and (v) the point (C) in the centre of therendering space 300 on the corners of the macro tiles 302 ₀, 302 ₁, 302₂ and 302 ₃. In step S412 a bounding box of the sub-polygon isdetermined and in step S414 it is determined that the size of thisbounding box is greater than the threshold. The method passes to stepS416 in which the area of the sub-polygon is determined, e.g. bybreaking the sub-polygon down into a plurality of triangles anddetermining the area of each triangle as described above based on thedeterminant calculated using the positions of the vertices of thetriangle. The areas of the different triangles can be summed to give thearea of the sub-polygon. In step S418 the area of the sub-polygon iscompared with the threshold area (e.g. ¼ of the area of the macro tile),and for primitive 306 it can be seen from FIG. 3 that the area of thesub-polygon in macro tile 302 ₂ covers more than ¼ of the area of themacro tile 302 ₂, so in this example the method passes to steps S420 andS422 such that the primitive 306 will be added to the macro tile controllist for the macro tile 302 ₂, but it will not be added to the tilecontrol lists for any of the tiles within the macro tile 302 ₂. Formacro tile 302 ₃, it can be appreciated from looking at FIG. 3 that theoverlap area between the bounding box of the primitive 306 with themacro tile 302 ₃ will be less than the threshold, e.g. less than ¼ ofthe area of the macro tile 302 ₃, so the primitive 306 will be added tothe tile control lists for the tiles that it covers within the macrotile 302 ₃, but it will not be added to the macro tile control list forthe macro tile 302 ₃.

As another example, for primitive 308, only the macro tile 302 ₀ will beidentified in step S402, and then selected in step S404. In step S406 abounding box for the primitive 306 is determined, and this bounding boxcovers only a single tile group 304 within the macro tile 302 ₀.Therefore, the overlap area between the bounding box of the primitive308 and the macro tile 302 ₀ will be small, in particular it will beless than the threshold used in step S408, e.g. less than ¼ of the areaof the macro tile 302 ₀. Therefore, the primitive 308 will be added tothe tile control lists for the tiles that it covers within the macrotile 302 ₀, but it will not be added to the macro tile control list forthe macro tile 302 ₀. Since the primitive 308 is not present within anyof macro tiles 302 ₁, 302 ₂ or 302 ₃, it will not be added to the macrotile control lists for these macro tiles or to any of the tile controllists for any of the tiles within these macro tiles.

As another example, the quad 310 is treated as an item of geometry,which is formed from two triangular primitives 310 ₀ and 310 ₁. For quad310, the macro tiles 302 ₁ and 302 ₃ (but not macro tiles 302 ₀ or 302₂) will be identified in step S402. The macro tile 302 ₁ will beselected first in step S404. In step S406 a bounding box for the quad310 will be determined and the overlap area between this bounding boxand the macro tile 302 ₁ will be determined. From looking at FIG. 3 itcan be appreciated that this overlap area will be small, in particularit will be less than the threshold used in step S408, e.g. less than ¼of the area of the macro tile 302 ₁. Therefore, the quad 310 will beadded to the tile control lists for the tiles that it covers within themacro tile 302 ₁, but it will not be added to the macro tile controllist for the macro tile 302 ₁. However, for macro tile 302 ₃ thebounding box of the quad 310 will overlap with most of the macro tile302 ₃, so the method passes to step S410 in which a sub-polygon isdetermined representing the part of the quad 310 which is within themacro tile 302 ₃. In step S412 a bounding box of the sub-polygon isdetermined and in step S414 it is determined that the size of thisbounding box is greater than the threshold. The method passes to stepS416 in which the area of the sub-polygon is determined, e.g. bybreaking the sub-polygon down into a plurality of triangles anddetermining the area of each triangle as described above based on thedeterminant calculated using the positions of the vertices of thetriangle. The areas of the different triangles can be summed to give thearea of the sub-polygon. In step S418 the area of the sub-polygon iscompared with the threshold area (e.g. ¼ of the area of the macro tile),and for quad 310 it can be seen from FIG. 3 that the area of thesub-polygon in macro tile 302 ₃ covers more than ¼ of the area of themacro tile 302 ₃, so in this example the method passes to steps S420 andS422 such that the quad 310 will be added to the macro tile control listfor the macro tile 302 ₃, but it will not be added to the tile controllists for any of the tiles within the macro tile 302 ₃.

Rendering Phase

As described above, the transformed items of geometry are stored inprimitive blocks (which may just be referred to herein generally as“data blocks”) in accordance with a submission order of the items ofgeometry. That is, an application submits in the items of geometry (e.g.primitives) to the graphics processing system 100 to be rendered in aparticular order (referred to as “submission order”) and this order ismaintained when the items of geometry are stored in the primitiveblocks. Each primitive block is associated with a primitive block ID(which may just be referred to herein generally as a “block ID”). Eachentry in the control lists includes: a primitive block ID to identify aprimitive block, and (ii) a primitive indication to indicate one or moreprimitives from the identified primitive block. A primitive indicationincluded in a macro tile control list may for example comprise aprimitive index which indicates which one of the primitives within theprimitive block the entry relates to. A primitive indication included ina tile control list may for example comprise a primitive mask whichindicates which one or more of the primitives within the primitive blockthe entry relates to.

The rendering phase, performed by the rendering logic, uses a methodshown in the flow chart of FIG. 5a . This method follows a similarapproach to that shown in steps S212 to S218 of FIG. 2 described above.However, now for each tile that is to be rendered there may be more thanone control list which indicates items of geometry which are presentwithin that tile. For example, there may be a tile control list for thetile and a macro tile control list for the macro tile which the tile iswithin. Therefore, the items of geometry within a tile may be renderedusing: (i) the macro tile control list for the macro tile of which thetile is a part, and (ii) the tile control list for the tile. In someexamples, there may be more than two control lists which are relevantfor a particular tile, and in these examples the items of geometrywithin a tile may be rendered using these more than two control lists.

Therefore, the rendering phase comprises, in step S502, fetching thecontrol lists which are relevant for rendering a tile (e.g. the tilecontrol list for the tile and the macro tile control list for the macrotile of which the tile is a part).

The process of fetching the items of geometry is more complex now thatthere is more than one control list identifying items of geometry to befetched for the rendering of a tile. In particular, the items ofgeometry should be fetched according to the submission order in whichthey were submitted to the graphics processing system. For example, atile may be associated with a macro tile control list 522 and a tilecontrol list 524 as shown in FIG. 5b . The two control lists areprocessed together in parallel. A pointer is maintained for each of thecontrol lists. For example, the pointer 526 is maintained for the macrotile control list 522 and the pointer 528 is maintained for the tilecontrol list 524. The pointers indicate the current entry of the controllist being processed. Initially both of the pointers 526 and 528 pointto the first entry in the respective control lists (as shown in FIG. 5b). Step S504 of the method comprises choosing, from the two controllists, the lowest primitive block ID which has not been previouslychosen (i.e. the primitive block ID of the entry indicated by thepointer). In step S506 one or more items of geometry are fetched fromthe primitive block with the chosen primitive block ID in accordancewith the primitive indication for the primitive block with the chosenprimitive block ID. When an entry has been chosen from a control listthen in step S508 the pointer for that control list is modified (i.e.updated) to point to the next entry in that control list.

In step S510, the fetched items of geometry are processed to therebyrender the items of geometry, e.g. by performing sampling on primitivesto determine primitive fragments at sample positions within the tile andthen performing hidden surface removal and texturing and/or shading onthe fragments to determine rendered values. As mentioned above, samplingmay be referred to as “rasterisation” or “scan conversion”. In stepS512, it is determined whether there are more entries in either of thecontrol lists 522 and 524. This can be done by determining whether thepointers have reached the ends of the respective control lists. If thereis at least one more entry in either control list then the method passesback to step S504 so that the next entry can be processed. If it isdetermined in step S512 that there are no more entries in the controllists then the method passes to step S514. In step S514, the renderedvalues can then be sent for storage. The rendered values may representan image of the scene as viewed from a viewpoint. In some examples, therendered values may represent a texture which can be stored in a texturememory, e.g. so that the rendered texture can be applied to a surfacewithin a scene which is subsequently rendered.

Let us assume that, in the example shown in FIG. 5b , the current tilebeing rendered is in the first tile block of the macro tile. The firstentry in the tile control list 524 will be chosen first (in step S504)because it has the lowest primitive block ID. The primitive maskindicates that the second, fourth and sixth primitives from primitiveblock 1 will be fetched. Next, the first entry in the macro tile controllist 522 will be chosen and the seventh primitive from primitive block 2will be fetched, because the tile block mask in the entry has a ‘1’ inthe first position meaning that entry in the macro tile control list 522is relevant for rendering the current tile. The second entry in themacro tile control list 522 has a ‘0’ in the first position of the tileblock mask, so this entry is not relevant for the current tile, so thepointer 526 is moved on to the third entry in the macro tile controllist 522. Next, the third entry in the macro tile control list 522 willbe chosen because it has a lower primitive block ID than that of thesecond entry in the tile control list 524, and the first primitive fromprimitive block 3 will be fetched. Next, the second entry in the tilecontrol list 524 will be chosen because it has a lower primitive blockID than that of the fourth entry in the macro tile control list 522, andthe first, fourth and eighth primitives from primitive block 4 will befetched.

Next, the pointer 526 will be pointing to the fourth entry in the macrotile control list 522 and the pointer 528 will be pointing to the thirdentry in the tile control list 524. These entries both have the sameprimitive block ID. In this situation the primitive index in the macrotile control list entry is merged with the primitive mask from the tilecontrol list entry to determine which primitives are to be fetched fromthe primitive block. In other words, if the lowest primitive block IDwhich has not been previously chosen is in both the macro tile controllist 522 and the tile control list 524 (i.e. if the pointers 526 and 528are pointing to entries with matching primitive block IDs) then a mergedprimitive mask is formed which identifies primitives from the primitiveblock with said lowest primitive block ID based on the primitive indexin the entry of the macro tile control list 522 and the primitive maskin the entry of the tile control list 524. In this example, the mergedprimitive mask for primitive block 5 will be 01000010. Therefore, thesecond and seventh primitives from primitive block 5 will be fetched. Itis noted that the primitive indexing in this example starts at 1, suchthat, for example, the “first” primitive from a primitive block has aprimitive index of 1 and the “second” primitive from a primitive blockhas a primitive index of 2, etc. In other examples, the primitiveindexing could start at zero, such that, for example, the “first”primitive from a primitive block would have a primitive index of 0 andthe “second” primitive from a primitive block has a primitive index of1, etc.

Then finally in the example shown in FIG. 5b , the fourth entry in thetile control list 524 will be chosen and the first, fifth, seventh andeighth primitives from primitive block 6 will be fetched.

Hierarchical Tiling With More Than Two Levels

In the examples described above with reference to FIGS. 4, 5 a and 5 bthere are just two levels of tiling, i.e. two levels at which an item ofgeometry may be added to a control list: at a macro tile level or at alower level (e.g. a tile level or a tile group level). However, in otherexamples, there may be more than two levels of tiling. In theseexamples, the method will determine whether an item of geometry can beconsidered to be “large” at the top level of tiling, i.e. in respect ofthe largest areas of the rendering space for which control lists arebeing created. If the item of geometry is large in respect of a toplevel region then the item of geometry is added to the control list ofthat top level region, and is not added to the control lists oflower-level regions that are within the top level region. However, ifthe item of geometry is not large in respect of a top level region thenthe method can step down a level and determine whether the item ofgeometry is large in respect of any of the regions at the new level. Thedetermination as to whether an item of geometry is large in respect of aregion can be performed as described above (e.g. by comparing a boundingbox or an area with a threshold), irrespective of the level at which theregion sits in the hierarchy of regions. The hierarchy can have manylevels.

For example, where there are three levels of tiling, the rendering spacemay be sub-divided into a plurality of top level regions (e.g. macrotiles), each of the macro tiles can be sub-divided into a plurality ofmiddle level regions (e.g. tile groups representing 4×4 groups oftiles), and each of the tile groups can be sub-divided into a pluralityof bottom level regions (e.g. tiles). In this example, the method canidentify which of the top level regions the item of geometry is presentwithin. For each identified top level region, an indication of thespatial coverage of the item of geometry, within the identified toplevel region, is determined (e.g. as an overlap between the identifiedtop level region and a bounding box or an area of the item of geometry).The indication of the spatial coverage is used to determine whether toadd the item of geometry to a top level control list (e.g. a macro tilecontrol list) for the identified top level region (e.g. macro tile) orto proceed with processing the item of geometry at a lower level oftiling (e.g. at the middle level). At the middle level of tiling, themethod identifies which of the middle level regions (e.g. tile groups)the item of geometry is present within. For each identified middle levelregion, an indication of the spatial coverage of the item of geometry,within the identified middle level region, is determined (e.g. as anoverlap between the identified middle level region and a bounding box oran area of the item of geometry). The indication of the spatial coverageis used to determine whether to add the item of geometry to a middlelevel control list (e.g. a tile group control list) for the identifiedmiddle level region or to add the item of geometry to one or morecontrol lists at the bottom level (e.g. tile control lists for tiles).In examples such as this, in which there are three levels of tiling: themiddle level regions (e.g. tile groups) may be referred to as “firstregions” and the middle level control lists may be referred to as “firstcontrol lists”; the bottom level regions (e.g. tiles) may be referred toas “second regions” and the bottom level control lists may be referredto as “second control lists”; and the top level regions (e.g. macrotiles) may be referred to as “third regions” and the top level controllists may be referred to as “third control lists”.

In examples where there are more than two (e.g. three) levels at whichthe control lists are created, during the rendering phase, whenrendering a particular tile, there may be more than two (e.g. three)control lists which are relevant for rendering the particular tile, andall of these control lists are processed together. A pointer ismaintained for each of the control lists to keep track of which of theitems of geometry from the different control lists have been processedalready, to ensure that the items of geometry are rendered in submissionorder for the particular tile, even though the items of geometry may beincluded in multiple separate control lists. For example, if there arethree levels of tiling, with control lists being created at the macrotile level, the tile group level and the tile level, when a particulartile is rendered the three control lists which are used are the tilecontrol list for the particular tile, the tile group control list forthe tile group of which the particular tile is a part, and the macrotile control list for the macro tile of which the tile group, of whichthe particular tile is a part, is a part.

Total Coverage

In some examples, as described above, an item of geometry might only beincluded in a first control list for a first region (e.g. a macro tilecontrol list for a macro tile) if the item of geometry totally coversthe first region. Therefore, in these examples, where there are just twolevels of tiling (e.g. a macro tile level and a tile level) anindication of the spatial coverage of an item of geometry in respect ofa macro tile is determined, and if the determined indication of spatialcoverage indicates that the item of geometry fully covers the macro tilethen the item of geometry is added to the macro tile control list forthat macro tile, whereas if the determined indication of spatialcoverage indicates that the item of geometry does not fully cover themacro tile then the item of geometry is added to the one or more tilecontrol lists for the one or more tiles within the macro tile in whichthe item of geometry is present.

In these examples, an item of geometry is only included in the macrotile control list if it totally covers the macro tile. For example, themethod can include determining whether the item of geometry fully covers(i.e. totally covers) the macro tile by determining whether the item ofgeometry overlaps with the entire area of the macro tile, or bydetermining whether the item of geometry is present at every sampleposition within the macro tile. As described above, one of the stepsperformed on an item of geometry during the rendering phase forrendering a particular tile is to perform sampling on the item ofgeometry in order to determine at which of the sample positions withinthe particular tile the item of geometry is present. However, in theseexamples in which an item of geometry is only included in the macro tilecontrol list if it totally covers the macro tile, then the presence ofthe item of geometry in the macro tile control list means that the itemof geometry is present at every sample position within the macro tile.Therefore, when rendering is performed for a particular tile within themacro tile, the step of performing sampling on an item of geometry todetermine at which of the sample positions within the particular tilethe item of geometry is present can be skipped for items of geometrywhich are included in the relevant macro tile control list since it isalready known that these items of geometry will be present at everysample position within the particular tile. In other words, therendering of items of geometry within a tile can comprise selectivelyprocessing items of geometry (e.g. by performing sampling on an item ofgeometry) to determine which sample points within the tile are coveredby the items of geometry, wherein this processing (e.g. sampling theitem of geometry) is skipped for items of geometry which are in themacro tile control list since it is known that items of geometry in themacro tile control list cover all of the sample points within the tile.Skipping the processing involved in sampling the item of geometry, inorder to determine at which of the sample positions within theparticular tile the item of geometry is present, can reduce the amountof processing required during the rendering phase, which can havetechnical benefits such as reduced power consumption and reducedlatency.

However, in some examples, as described above, items of geometry can beincluded in a macro tile control list if they are “large” in respect ofthe respective macro tile even if the item of geometry does not entirelycover the macro tile. Furthermore, in all of the examples describedabove, an item of geometry may be included in a tile control list for atile in which it is present, irrespective of whether the item ofgeometry completely covers the tile. Therefore, there are situations inwhich the presence of an item of geometry within a control list for aregion is not enough information to determine whether the item ofgeometry totally covers the region. Therefore, in some examples, someextra data can be stored for an item of geometry, e.g. in the controllist for a region, to indicate whether the item of geometry totallycovers the region. This extra data may be a flag (e.g. a one-bit flag)for each item of geometry included in a control list to indicate whetherthe item of geometry totally covers the region with which the controllist is associated.

The concept of determining, during the geometry processing phase,whether an item of geometry totally covers a region, and if it does,skipping the processing involved in performing sampling on the item ofgeometry (i.e. in order to determine at which of the sample positionswithin the particular tile the item of geometry is present) during therendering phase can be used in a system as described above which usesmultiple levels of tiling, but it can also be used in other systems,e.g. systems which do not use multiple levels of tiling, i.e. systemswhich use a single level of tiling.

FIG. 6 shows an example of a region 602 of a rendering space and twoprimitives 604 and 606. The region 602 could, for example, be a tile ora group of tiles. In the example shown in FIG. 6 the region 602 issquare, but in other examples the region could be other shapes, e.g.rectangular. In the example shown in FIG. 6 the two primitives 604 and606 are triangular, but in other examples the primitives could be othershapes.

A method of rendering primitives which uses the concept of skipping thesampling processing (i.e. in order to determine at which of the samplepositions within the particular tile the primitive is present) forprimitives which totally cover a region of the rendering space isdescribed with reference to the flow chart of FIG. 7. Similar to theexamples described above, the method shown in FIG. 7 comprises ageometry processing phase performed by geometry processing logic (e.g.geometry processing logic 104) followed by a rendering phase performedby rendering logic (e.g. rendering logic 106). In the geometryprocessing phase the geometry (e.g. primitives) are processed todetermine which primitives (and other items of geometry) are presentwithin which regions (e.g. tiles, tile groups or macro tiles) of therendering space. Then in the rendering phase, a region can be renderedby retrieving all of the geometry which is relevant for that region (butnot geometry which is not relevant for that region) and then theretrieved geometry can be processed to determine rendered values foreach of the sample points within the region. As described above, theremay be one or more sample points for each pixel in a region.

In step S702, a primitive is processed (e.g. by performing “tiling”) toidentify which regions (e.g. tiles) the primitive is present within.Methods of performing tiling are known in the art, some of which aredescribed above.

In step S704 one of the identified regions is selected.

In step S706 data to indicate that the primitive is present within theidentified region is stored. For example, primitive indication data maybe stored (e.g. in a control list) for the region to indicate thedetermined primitives for the region.

In step S708, the geometry processing logic determines whether theprimitive totally covers the region. If it is determined in step S708that the primitive totally covers the region then in step S710 data isstored for the primitive to indicate total coverage of the region. Forexample, the stored data for the primitive may comprise a flag toindicate total coverage of the region. However, if it is determined instep S708 that the primitive does not totally cover the region then stepS710 is bypassed, i.e. not performed, and the method passes from stepS708 to step S712. In some examples, if it is determined that theprimitive does not totally cover the region then data may be stored forthe primitive to indicate that it does not totally cover the region. Thestored data (e.g. the flag) may be stored in the control list for theregion with the primitive indication data which indicates whichprimitives are present in the region. Therefore, the control list for aregion may include indications of the primitives which are presentwithin that region, and for each indicated primitive there may be anindication (e.g. a one bit flag) to indicate whether or not theprimitive totally covers the region.

The way in which step S708 is performed, i.e. the way in which it isdetermined whether the primitive totally covers the region, may bedifferent in different examples. For example, in step S708 the regionmay be considered to be an area, such that the step of determiningwhether a primitive totally covers a region comprises determiningwhether the primitive covers the entire area of the region. In somealternative examples, the positions of the sample points within theregion may be taken into account, such that the step of determiningwhether a primitive totally covers a region comprises determiningwhether the primitive covers every sample point in the region.

Step S708 of determining whether a primitive totally covers a region maycomprise processing each edge of the primitive by: (i) determining whichof the corners of the region is most likely to be outside of the edge,and (ii) determining whether the determined corner is inside the edge.Methods of performing these two determinations are known in the art. Thedetermination of whether the determined corner is inside the edge mayuse a calculation involving a line equation describing the edge and aposition of the determined corner. If it is determined that all of thedetermined corners are inside the respective edges then the primitivetotally covers the region, but if for any of the edges of the primitive,the determined corner is outside of the edge then the primitive does nottotally cover the region. For example, with reference to FIG. 6, forprimitive 604, for the top left edge, the corner C₀ is the corner of theregion 602 which is most likely to be outside of the edge, and it can beseen that this corner C₀ is outside of the top left edge of primitive604. As such, it is determined that the primitive 604 does not totallycover the region 602.

For primitive 606, for the left edge, it will be determined that cornerC₀ is the most likely to be outside the edge, but it will be determinedthat corner C₀ is inside the left edge of primitive 606. Similarly, forthe top right edge of the primitive 606 it will be determined thatcorner C₁ is the most likely to be outside the edge, but it will bedetermined that corner C₁ is inside the top right edge of primitive 606.Similarly, for the bottom edge of the primitive 606, it will bedetermined that corner C₃ is the most likely to be outside the edge, butit will be determined that corner C₃ is inside the bottom edge ofprimitive 606. Therefore, it will be determined that the primitive 606totally covers the region 602.

The processing (e.g. evaluating line equations) involved in performingthe calculations used to determine whether a corner point is inside anedge can be significant, e.g. in terms of the power consumption andlatency of the system, particularly since they may be performed for many(e.g. millions of) primitives and in respect of many (e.g. thousands of)regions. Therefore, in some examples, at least some of thesecalculations can be avoided in some situations. In particular, a simpletest can establish that a primitive definitely does not fully cover aregion. When a triangular primitive totally covers a region (wherein theregion is rectangular (where the term “rectangular” includes square)),the dimensions of the bounding box of the primitive must be greater thanor equal to the size of the respective dimensions of the region, and atleast one of the dimensions of the bounding box must be greater than orequal to twice the respective dimension of the region. Therefore, thestep of determining whether a primitive totally covers a region mayinclude identifying that a primitive definitely does not fully cover aregion by determining a bounding box of the primitive (e.g. anaxis-aligned bounding box, i.e. a rectangular bounding box which isaligned with the orientation of the rectangular region), determining asize of the bounding box in both horizontal and vertical directions, andthen comparing the size of the bounding box in the horizontal direction(BB_(x)) with a size of the region in the horizontal direction (R_(x)),and comparing the size of the bounding box in the vertical direction(BB_(y)) with a size of the region in the vertical direction (R_(y)). Itis determined that the primitive does not totally cover the region ifany of the following conditions are satisfied: (i) BB_(x)<R_(x), (ii)BB_(y)<R_(y), or (iii) (BB_(x)<2R_(x)) AND (BB_(y)<2R_(y)), without theneed to perform calculations as described above (which may be referredto as “coverage tests”) involving the line equations of the edges of theprimitive. If all of these conditions are not satisfied then adefinitive determination regarding full coverage remains to be made. Inthat case the method can continue to perform the coverage tests for theprimitive to make that determination. The number of coverage tests canbe reduced by using the bounding boxes as described above, which canresult in a reduction in processing power and latency in the system. Itis noted that it is computationally very simple to determine a boundingbox (e.g. an axis aligned bounding box) for a primitive, and to comparethe size of the bounding box to the size of a region in order todetermine whether the three conditions mentioned above are satisfied.

In step S712 the geometry processing logic determines whether there areany more identified regions for the primitive. If there are then themethod passes back to step S704 in which another identified region isselected for the region and the method steps S706 to S710 are performedfor the newly selected region. If it is determined in step S712 thatthere are no more identified regions for the primitive then the methodpasses to step S714 in which it is determined whether there are any moreprimitives of the current render to process in the geometry processingphase. If there is another primitive in the current render that has notyet been processed then the method passes back to step S702 and themethod is performed for the new primitive. However, if there is notanother primitive in the current render that has not yet been processedthen the geometry processing phase is complete for the current render.

Then the rendering phase can begin. As described above, the renderingphase can be performed by rendering logic on a region-by-region basis,e.g. a tile-by-tile basis. In this way, individual regions can berendered independently. The control list for a region identifies whichprimitives are relevant for rendering a particular region, e.g. whichprimitives are present within the particular region. In step S716 thestored data for the primitives which are present within a region can beretrieved. This stored data can include the data describing theprimitives (such as position and attribute data), and it can alsoinclude the data that was stored in the geometry processing phase toindicate whether or not the primitive totally covers the region.

Part of the rendering phase for a region is to perform sampling todetermine which sample points within the region a primitive is presentat and to determine primitive fragments at the sample points which aprimitive is present at. As mentioned above, this process may bereferred to as “scan conversion” or “rasterization”. If it is known thata primitive totally covers the region then it is known that theprimitive is present at every sample point within the region withoutneeding to perform any further processing (e.g. the aforementionedsampling) in order to determine this. Therefore, the rendering phasecomprises selectively processing the primitives which are present in theregion based on the retrieved data to determine which sample pointswithin the region are covered by the primitives, wherein if theretrieved data indicates total coverage of the region for a particularprimitive then the processing to determine which sample points withinthe region are covered by the particular primitive is skipped. Inparticular, in step S718 the rendering logic determines whether theretrieved data for a primitive indicates that the primitive totallycovers the region, and if it does then the method passes to step S722for that primitive, i.e. by skipping or bypassing step S720. However, itis determined in step S718 that the primitive does not totally cover theregion then the method will pass from step S718 to step S720 in whichsampling is performed in order to determine which sample points withinthe region are covered by the primitive.

For example, when the rendering logic is rendering the region 602, bothof the primitives 604 and 606 will be indicated as being present withinthe region 602. Data will have been stored during the geometryprocessing phase for the primitive 606 to indicate that it totallycovers the region 602, but the primitive 604 does not totally cover theregion. Therefore, during the rendering phase, when processing theprimitive 604 the sampling is performed in step S720 in order todetermine which of the sample points of the region 602 the primitive 604is present at. However, during the rendering phase, when processing theprimitive 606, the sampling (i.e. step S720) can be skipped, and therendering logic determines that the primitive is present at all of thesample points within the region 602 without needing to perform samplingin respect of the primitive.

In step S722 the primitive fragments representing the primitives at thesample points within the region are processed in order to determinerendered values at the sample points. In other words, rendered valuesare determined at the sample points within the region based on theprimitives which cover the respective sample points. This rendering usesthe primitive data for the each of the primitives which are present inthe region (e.g. the primitive data as interpolated at each of thesample points at which the primitive is present). Step S722 involvesprocessing primitive fragments to determine rendered values byperforming processes such as hidden surface removal, texturing and/orshading. The fragment processing operations performed in step S722 areknown in the art and can be performed in different way in differentexamples.

The rendering phase is performed for each of the regions within therendering space, such that rendered values can be determined for thewhole render. The rendered values may be provided to a memory, e.g. forstorage in a frame buffer. The rendered values may represent an image ofa scene as viewed from a viewpoint. In some examples, the renderedvalues may represent a texture to be applied to a surface in a scene.The rendered values can be used in any suitable manner, e.g. if therendered values represent an image of a scene then it may be displayedon a display or stored in memory or transmitted to another device, etc.

FIG. 8 shows a computer system in which the graphics processing systemsdescribed herein may be implemented. The computer system comprises a CPU802, a GPU 804, a memory 806 and other devices 808, such as a display810, speakers 812 and a camera 814. The components of the computersystem can communicate with each other via a communications bus 816. Atleast part of the memory 806 may be used as the memory 102 shown in FIG.1.

The graphics processing system of FIG. 1 is shown as comprising a numberof functional blocks. This is schematic only and is not intended todefine a strict division between different logic elements of suchentities. Each functional block may be provided in any suitable manner.It is to be understood that intermediate values described herein asbeing formed by a graphics processing system need not be physicallygenerated by the graphics processing system at any point and may merelyrepresent logical values which conveniently describe the processingperformed by the graphics processing system between its input andoutput.

The graphics processing systems described herein may be embodied inhardware on an integrated circuit. The graphics processing systemsdescribed herein may be configured to perform any of the methodsdescribed herein. Generally, any of the functions, methods, techniquesor components described above can be implemented in software, firmware,hardware (e.g., fixed logic circuitry), or any combination thereof. Theterms “module,” “functionality,” “component”, “element”, “unit”, “block”and “logic” may be used herein to generally represent software,firmware, hardware, or any combination thereof. In the case of asoftware implementation, the module, functionality, component, element,unit, block or logic represents program code that performs the specifiedtasks when executed on a processor. The algorithms and methods describedherein could be performed by one or more processors executing code thatcauses the processor(s) to perform the algorithms/methods. Examples of acomputer-readable storage medium include a random-access memory (RAM),read-only memory (ROM), an optical disc, flash memory, hard disk memory,and other memory devices that may use magnetic, optical, and othertechniques to store instructions or other data and that can be accessedby a machine.

The terms computer program code and computer readable instructions asused herein refer to any kind of executable code for processors,including code expressed in a machine language, an interpreted languageor a scripting language. Executable code includes binary code, machinecode, bytecode, code defining an integrated circuit (such as a hardwaredescription language or netlist), and code expressed in a programminglanguage code such as C, Java or OpenCL. Executable code may be, forexample, any kind of software, firmware, script, module or librarywhich, when suitably executed, processed, interpreted, compiled,executed at a virtual machine or other software environment, cause aprocessor of the computer system at which the executable code issupported to perform the tasks specified by the code.

A processor, computer, or computer system may be any kind of device,machine or dedicated circuit, or collection or portion thereof, withprocessing capability such that it can execute instructions. A processormay be any kind of general purpose or dedicated processor, such as aCPU, GPU, System-on-chip, state machine, media processor, anapplication-specific integrated circuit (ASIC), a programmable logicarray, a field-programmable gate array (FPGA), or the like. A computeror computer system may comprise one or more processors.

It is also intended to encompass software which defines a configurationof hardware as described herein, such as HDL (hardware descriptionlanguage) software, as is used for designing integrated circuits, or forconfiguring programmable chips, to carry out desired functions. That is,there may be provided a computer readable storage medium having encodedthereon computer readable program code in the form of an integratedcircuit definition dataset that when processed (i.e. run) in anintegrated circuit manufacturing system configures the system tomanufacture a graphics processing system configured to perform any ofthe methods described herein, or to manufacture a graphics processingsystem comprising any apparatus described herein. An integrated circuitdefinition dataset may be, for example, an integrated circuitdescription.

Therefore, there may be provided a method of manufacturing, at anintegrated circuit manufacturing system, a graphics processing system asdescribed herein. Furthermore, there may be provided an integratedcircuit definition dataset that, when processed in an integrated circuitmanufacturing system, causes the method of manufacturing a graphicsprocessing system to be performed.

An integrated circuit definition dataset may be in the form of computercode, for example as a netlist, code for configuring a programmablechip, as a hardware description language defining hardware suitable formanufacture in an integrated circuit at any level, including as registertransfer level (RTL) code, as high-level circuit representations such asVerilog or VHDL, and as low-level circuit representations such as OASIS®and GDSII. Higher level representations which logically define hardwaresuitable for manufacture in an integrated circuit (such as RTL) may beprocessed at a computer system configured for generating a manufacturingdefinition of an integrated circuit in the context of a softwareenvironment comprising definitions of circuit elements and rules forcombining those elements in order to generate the manufacturingdefinition of an integrated circuit so defined by the representation. Asis typically the case with software executing at a computer system so asto define a machine, one or more intermediate user steps (e.g. providingcommands, variables etc.) may be required in order for a computer systemconfigured for generating a manufacturing definition of an integratedcircuit to execute code defining an integrated circuit so as to generatethe manufacturing definition of that integrated circuit.

An example of processing an integrated circuit definition dataset at anintegrated circuit manufacturing system so as to configure the system tomanufacture a graphics processing system will now be described withrespect to FIG. 9.

FIG. 9 shows an example of an integrated circuit (IC) manufacturingsystem 902 which is configured to manufacture a graphics processingsystem as described in any of the examples herein. In particular, the ICmanufacturing system 902 comprises a layout processing system 904 and anintegrated circuit generation system 906. The IC manufacturing system902 is configured to receive an IC definition dataset (e.g. defining agraphics processing system as described in any of the examples herein),process the IC definition dataset, and generate an IC according to theIC definition dataset (e.g. which embodies a graphics processing systemas described in any of the examples herein). The processing of the ICdefinition dataset configures the IC manufacturing system 902 tomanufacture an integrated circuit embodying a graphics processing systemas described in any of the examples herein.

The layout processing system 904 is configured to receive and processthe IC definition dataset to determine a circuit layout. Methods ofdetermining a circuit layout from an IC definition dataset are known inthe art, and for example may involve synthesising RTL code to determinea gate level representation of a circuit to be generated, e.g. in termsof logical components (e.g. NAND, NOR, AND, OR, MUX and FLIP-FLOPcomponents). A circuit layout can be determined from the gate levelrepresentation of the circuit by determining positional information forthe logical components. This may be done automatically or with userinvolvement in order to optimise the circuit layout. When the layoutprocessing system 904 has determined the circuit layout it may output acircuit layout definition to the IC generation system 906. A circuitlayout definition may be, for example, a circuit layout description.

The IC generation system 906 generates an IC according to the circuitlayout definition, as is known in the art. For example, the ICgeneration system 906 may implement a semiconductor device fabricationprocess to generate the IC, which may involve a multiple-step sequenceof photo lithographic and chemical processing steps during whichelectronic circuits are gradually created on a wafer made ofsemiconducting material. The circuit layout definition may be in theform of a mask which can be used in a lithographic process forgenerating an IC according to the circuit definition. Alternatively, thecircuit layout definition provided to the IC generation system 906 maybe in the form of computer-readable code which the IC generation system906 can use to form a suitable mask for use in generating an IC.

The different processes performed by the IC manufacturing system 902 maybe implemented all in one location, e.g. by one party. Alternatively,the IC manufacturing system 902 may be a distributed system such thatsome of the processes may be performed at different locations, and maybe performed by different parties. For example, some of the stages of:(i) synthesising RTL code representing the IC definition dataset to forma gate level representation of a circuit to be generated, (ii)generating a circuit layout based on the gate level representation,(iii) forming a mask in accordance with the circuit layout, and (iv)fabricating an integrated circuit using the mask, may be performed indifferent locations and/or by different parties.

In other examples, processing of the integrated circuit definitiondataset at an integrated circuit manufacturing system may configure thesystem to manufacture a graphics processing system without the ICdefinition dataset being processed so as to determine a circuit layout.For instance, an integrated circuit definition dataset may define theconfiguration of a reconfigurable processor, such as an FPGA, and theprocessing of that dataset may configure an IC manufacturing system togenerate a reconfigurable processor having that defined configuration(e.g. by loading configuration data to the FPGA).

In some embodiments, an integrated circuit manufacturing definitiondataset, when processed in an integrated circuit manufacturing system,may cause an integrated circuit manufacturing system to generate adevice as described herein. For example, the configuration of anintegrated circuit manufacturing system in the manner described abovewith respect to FIG. 9 by an integrated circuit manufacturing definitiondataset may cause a device as described herein to be manufactured.

In some examples, an integrated circuit definition dataset could includesoftware which runs on hardware defined at the dataset or in combinationwith hardware defined at the dataset. In the example shown in FIG. 9,the IC generation system may further be configured by an integratedcircuit definition dataset to, on manufacturing an integrated circuit,load firmware onto that integrated circuit in accordance with programcode defined at the integrated circuit definition dataset or otherwiseprovide program code with the integrated circuit for use with theintegrated circuit.

The implementation of concepts set forth in this application in devices,apparatus, modules, and/or systems (as well as in methods implementedherein) may give rise to performance improvements when compared withknown implementations. The performance improvements may include one ormore of increased computational performance, reduced latency, increasedthroughput, and/or reduced power consumption. During manufacture of suchdevices, apparatus, modules, and systems (e.g. in integrated circuits)performance improvements can be traded-off against the physicalimplementation, thereby improving the method of manufacture. Forexample, a performance improvement may be traded against layout area,thereby matching the performance of a known implementation but usingless silicon. This may be done, for example, by reusing functionalblocks in a serialised fashion or sharing functional blocks betweenelements of the devices, apparatus, modules and/or systems. Conversely,concepts set forth in this application that give rise to improvements inthe physical implementation of the devices, apparatus, modules, andsystems (such as reduced silicon area) may be traded for improvedperformance. This may be done, for example, by manufacturing multipleinstances of a module within a predefined area budget.

The applicant hereby discloses in isolation each individual featuredescribed herein and any combination of two or more such features, tothe extent that such features or combinations are capable of beingcarried out based on the present specification as a whole in the lightof the common general knowledge of a person skilled in the art,irrespective of whether such features or combinations of features solveany problems disclosed herein. In view of the foregoing description itwill be evident to a person skilled in the art that variousmodifications may be made within the scope of the invention.

What is claimed is:
 1. A method of rendering items of geometry in agraphics processing system, wherein the graphics processing system isconfigured to use a rendering space which is sub-divided into aplurality of first regions, each of the first regions being sub-dividedinto a plurality of second regions within the rendering space, whereinthe method comprises: processing a plurality of items of geometryincluding at least one item of geometry which is present within two ormore of the first regions, wherein each of the plurality of items ofgeometry is processed by: identifying which of the first regions theitem of geometry is present within; and for each identified firstregion: determining an indication of the spatial coverage, within theidentified first region, of the item of geometry; and using thedetermined indication of the spatial coverage within the identifiedfirst region to determine whether to add the item of geometry to a firstcontrol list for the identified first region or to add the item ofgeometry to one or more second control lists for a respective one ormore of the second regions within the identified first region; andrendering items of geometry within a second region using: (i) the firstcontrol list for the first region of which the second region is a part,and (ii) the second control list for the second region.
 2. The method ofclaim 1, wherein said using the determined indication of the spatialcoverage within the identified first region comprises: comparing thedetermined indication of the spatial coverage with a threshold; andusing a result of the comparison to determine whether to add the item ofgeometry to the first control list or to the one or more second controllists.
 3. The method of claim 1, wherein said determining an indicationof the spatial coverage, within the identified first region, of the itemof geometry comprises determining a sub-polygon representing part of theitem of geometry within the identified first region.
 4. The method ofclaim 3, further comprising: determining a bounding box of thesub-polygon; and comparing a size of the bounding box of the sub-polygonwith a threshold size, wherein if the size of the bounding box is belowthe threshold size then the item of geometry is added to the one or moresecond control lists.
 5. The method of claim 4, wherein if the size ofthe bounding box of the sub-polygon is above the threshold size then themethod further comprises comparing the area of the sub-polygon with athreshold area, wherein if the area of the sub-polygon is below thethreshold area then the item of geometry is added to the one or moresecond control lists, and wherein if the area of the sub-polygon isabove the threshold area then the item of geometry is added to the firstcontrol list.
 6. The method of claim 3, wherein said determining anindication of the spatial coverage, within the identified first region,of the item of geometry further comprises: determining the area of thesub-polygon; and comparing the determined area of the sub-polygon with athreshold area, wherein if the area of the sub-polygon is below thethreshold area then the item of geometry is added to the one or moresecond control lists, and wherein if the area of the sub-polygon isabove the threshold area then the item of geometry is added to the firstcontrol list.
 7. The method of claim 5, wherein the area of thesub-polygon is determined using co-ordinates of the vertices of thesub-polygon which are rounded to quantised positions, wherein thequantised positions are aligned with boundaries between the secondregions or with boundaries between blocks of second regions.
 8. Themethod of claim 1, wherein said determining an indication of the spatialcoverage, within the identified first region, of the item of geometrycomprises determining the number of second regions within the firstregion in which the item of geometry is present.
 9. The method of claim8, wherein: if the item of geometry is present within more than athreshold number of the second regions within the first region then theitem of geometry is included in the first control list for the firstregion, and if the item of geometry is present within less than thethreshold number of the second regions within the first region then theitem of geometry is included in the one or more second control lists forthe respective one or more second regions within the first region inwhich the item of geometry is present.
 10. The method of claim 8,wherein: if the item of geometry is present within all of the secondregions within the first region then the item of geometry is included inthe first control list for the first region, and if the item of geometryis present within fewer than all of the second regions within the firstregion then the item of geometry is included in the one or more secondcontrol lists for the respective one or more second regions within thefirst region in which the item of geometry is present.
 11. The method ofclaim 1, wherein said using the determined indication of the spatialcoverage within the identified first region comprises: if the determinedindication of the spatial coverage indicates that the item of geometryfully covers the identified first region, adding the item of geometry tothe first control list, and if the determined indication of the spatialcoverage indicates that the item of geometry does not fully cover theidentified first region, adding the item of geometry to the one or moresecond control lists for the respective one or more second regionswithin the identified first region in which the item of geometry ispresent, wherein said rendering items of geometry within a second regioncomprises selectively processing items of geometry to determine whichsample points within the second region are covered by the items ofgeometry, wherein said processing is skipped for items of geometry whichare in the first control list since it is known that items of geometryin the first control list cover all of the sample points within thesecond region.
 12. The method of claim 1, wherein the items of geometryare stored in data blocks in accordance with a submission order of theitems of geometry, wherein each data block is associated with a blockID, and wherein entries in the control lists include a block ID with ageometry indication to identify a data block and to indicate one or moreitems of geometry from the identified data block.
 13. The method ofclaim 12, wherein said rendering items of geometry within a secondregion comprises: choosing, from the first control list for the firstregion of which the second region is a part and the second control listfor the second region, the lowest block ID which has not been previouslychosen; and fetching one or more items of geometry from the data blockwith the chosen block ID in accordance with the geometry indication forsaid data block with the chosen block ID.
 14. The method of claim 13,wherein if the lowest block ID which has not been previously chosen isin both the first control list for the first region of which the secondregion is a part and the second control list for the second region, thenthe method comprises forming a merged geometry indication whichidentifies items of geometry from the data block with said lowest blockID based on the geometry indications of said first and second controllists.
 15. The method of claim 1, further comprising, for eachidentified first region, if an item of geometry is to be added to thefirst control list for the identified first region: determining asub-region mask for the item of geometry to indicate which of aplurality of sub-regions within the first region the item of geometry ispresent within; and including the sub-region mask for the item ofgeometry in the first control list, wherein: the sub-regions are secondregions within the first region, or the sub-regions are groups of secondregions within the first region.
 16. The method of claim 1, whereinadding an item of geometry to a control list comprises adding anindication of the item of geometry to the control list.
 17. The methodof claim 1, wherein the rendering space is sub-divided into a pluralityof third regions, wherein each of the third regions corresponds to agroup of first regions within the rendering space, wherein saidprocessing an item of geometry comprises: identifying which of the thirdregions the item of geometry is present within; and for each identifiedthird region: determining an indication of the spatial coverage, withinthe identified third region, of the item of geometry; and using thedetermined indication of the spatial coverage within the identifiedthird region to determine whether to add the item of geometry to a thirdcontrol list for the identified third region or to proceed with saidprocessing of the item of geometry; and wherein the items of geometrywithin a second region are rendered further using: (iii) the thirdcontrol list for the third region of which the first region, of whichthe second region is a part, is a part.
 18. The method of claim 1,wherein the items of geometry are within a 3D scene to be rendered froma viewpoint, and wherein said rendering items of geometry generatesimage values representing an image of the scene as viewed from theviewpoint.
 19. A graphics processing system configured to render itemsof geometry using a rendering space which is sub-divided into aplurality of first regions, each of the first regions being sub-dividedinto a plurality of second regions within the rendering space, whereinthe graphics processing system comprises: geometry processing logicconfigured to process a plurality of items of geometry including atleast one item of geometry which is present within two or more of thefirst regions, wherein the geometry processing logic is configured toprocess each of the plurality of items of geometry by: identifying whichof the first regions the item of geometry is present within; and foreach identified first region: determining an indication of the spatialcoverage, within the identified first region, of the item of geometry;and using the determined indication of the spatial coverage within theidentified first region to determine whether to add the item of geometryto a first control list for the identified first region or to add theitem of geometry to one or more second control lists for a respectiveone or more of the second regions within the identified first region;and rendering logic configured to render items of geometry within asecond region using: (i) the first control list for the first region ofwhich the second region is a part, and (ii) the second control list forthe second region.
 20. A non-transitory computer readable storage mediumhaving stored thereon a computer readable dataset description of agraphics processing system that, when processed in an integrated circuitmanufacturing system, causes the integrated circuit manufacturing systemto manufacture an integrated circuit embodying the graphics processingsystem which is configured to render items of geometry using a renderingspace which is sub-divided into a plurality of first regions, each ofthe first regions being sub-divided into a plurality of second regionswithin the rendering space, wherein the graphics processing systemcomprises: geometry processing logic configured to process a pluralityof items of geometry including at least one item of geometry which ispresent within two or more of the first regions, wherein the geometryprocessing logic is configured to process each of the plurality of itemsof geometry by: identifying which of the first regions the item ofgeometry is present within; and for each identified first region:determining an indication of the spatial coverage, within the identifiedfirst region, of the item of geometry; and using the determinedindication of the spatial coverage within the identified first region todetermine whether to add the item of geometry to a first control listfor the identified first region or to add the item of geometry to one ormore second control lists for a respective one or more of the secondregions within the identified first region; and rendering logicconfigured to render items of geometry within a second region using: (i)the first control list for the first region of which the second regionis a part, and (ii) the second control list for the second region.